package com.woniuxy.springbootthymeleaf.interceptor;

import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author linke
 * @version 1.0
 * @className: CustomInterceptor
 * @description: 拦截器  配置类
 * @date 2021/11/17 1:39
 */
public class CustomInterceptor extends HandlerInterceptorAdapter {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        //可以有很多业务代码
        System.out.println("拦截器代码执行...");
        return true;
    }
}